package com.weixing.oauth2.common.userdetails;

import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;

import javax.servlet.http.HttpServletRequest;
import java.util.Collection;

/**
 * @Author: kfc
 * @Description: <br/>
 * Date:Create in 2019/8/29 17:45
 * @Modified By:
 */
public interface IUserDetailsService extends UserDetailsService {

    void handlerLoginData(HttpServletRequest request, SecurityUser securityUser);

    UserDetails loadUserByMobile(String mobile) throws UsernameNotFoundException;

    Collection<GrantedAuthority> loadAuthority(Long userId);

    UserDetails loadUserByPhoneAndPassword(String phone, String password);

    UserDetails loadUserByPhoneAndSmsCode(String phone, String smsCode);
}
